#text transfer csv
# coding: utf-8
import csv
import numpy
# fileOfTxt = open('H:/Datamining/German Credit Dataset/German.data-numeric.txt','r')
# csvfile = file('H:/Datamining/German Credit Dataset/German.data-numeric.csv', 'wb')
# writer = csv.writer(csvfile)

trainData = open('H:/Datamining/German Credit Dataset/train.csv', 'wb')

for line1 in trainData:
	if line1[24] == 2:
		line1[24] = 0
	else:
		line1[24] = 1

# while True:
# for line in fileOfTxt:
# 	if line:
# 		data = line.split(" ")
# 		numOfGerman = []
# 		for num in data:
# 			if num != '':
# 				numOfGerman.append(num)
# 		print numOfGerman
# 		writer.writerow(numOfGerman)
# 	else:
# 		break
# fileOfTxt.close()
# csvfile.close()